home *** CD-ROM | disk | FTP | other *** search
/ Regional Industry Buying Guide: Greater Florida / 2000 Regional Industry Buying Guide - Greater Florida.iso / cs2k / clients / classic / scripts.lib / TRANSPAC.SCR < prev    next >
Encoding:
Text File  |  1998-09-30  |  1.7 KB  |  78 lines

  1. !
  2. !  Copyright (c) 1998
  3. !  by CompuServe Incorporated, Columbus, Ohio
  4. !
  5. !  The information in this software is subject to change without
  6. !  notice and should not be construed as a commitment by CompuServe.
  7. !
  8. !  Transpac:
  9. !       Connect to Transpac or Transpac-Ascend gateway.
  10. !       Arg1 contains TRUE if connect is to Transpac-Ascend, and False
  11. !       if connect is to original Transpac login.
  12. !
  13. !       Success:  returns %Success
  14. !       Failure:  saves error msg in %FailureMsg and returns %Failure
  15. !
  16. !+V
  17. ! "4.0.5"
  18. !-V
  19.  
  20. ASCEND = Arg1;
  21.  
  22. Tries = 5;
  23. twice_tried = %FALSE;
  24. on cancel goto Return_Cancel;
  25.  
  26. show "Connecting to Transpac";
  27.  
  28. if ASCEND = %TRUE goto Ascend_NUA;
  29. CompuServe_NUA = "19628030";
  30. goto Wait_Transpac;
  31.  
  32.  
  33. Ascend_NUA:
  34. CompuServe_NUA = "cis";
  35.  
  36.  
  37. Wait_Transpac:
  38.     if Tries = 0 goto Transpac_Failure;
  39.     Tries = Tries - 1;
  40.     
  41.     wait
  42.         "TRANSPAC"      goto Send_Address,
  43.         "Password:"     goto Send_Address,
  44.         "ERROR"         goto Resend_Address,
  45.         "CLR"           goto Resend_Address,
  46.         %mdm_Failure    goto Transpac_Failure,
  47.         "connected"     goto Return_Success,
  48.         "COM"           goto Return_Success
  49.     until 80;
  50.  
  51.     send %CR;
  52.     goto Send_Address;
  53.                   
  54. Resend_Address:
  55.     if twice_tried = %TRUE goto Cserve_NUA_Failure;
  56.     twice_tried = %TRUE;
  57.  
  58. Send_Address:
  59.     show "Sending CompuServe NUA...";
  60.     send CompuServe_NUA & %CR;
  61.     goto Wait_Transpac;
  62.  
  63. Transpac_Failure:
  64.     define %FailureMsg = "Transpac not responding";
  65.     goto Return_Failure;
  66.  
  67. Cserve_NUA_Failure:
  68.     define %FailureMsg = "Transpac not accepting CompuServe NUA";
  69.  
  70. Return_Failure:
  71.     exit %Failure;
  72.  
  73. Return_Cancel:
  74.     exit %Cancel;
  75.  
  76. Return_Success:
  77.     exit %Success;
  78.